import { LocalStorage } from "./LocalStorage";
import { AudioEngine } from "./AudioEngine";
import { IDataManager } from "../cfw/data/IDataManager";
import { IAudioEngine } from "../cfw/audio/IAudioEngine";
import { IResBundle } from "../cfw/res/IResBundle";
import ResBundle from "./ResBundle";
import { IEngine } from "../cfw/engine/IEngine";

export class Cocos3Engine implements IEngine {

    protected localStorage: IDataManager = new LocalStorage();
    protected audioEngine: IAudioEngine = new AudioEngine();

    getBundle(bundle: any, name: string): IResBundle {
        let b = new ResBundle(bundle, name);
        return b;
    }

    getAudio(): IAudioEngine {
        return this.audioEngine;
    }

    getLocalstorage(): IDataManager {
        return this.localStorage;
    }
}